<?php
/**
 * Short Description  
 *
 * Long Description 
 *
 * @copyright 
 * @version   $Id: ResourceActionDAO.php 12 2011-04-09 08:58:51Z sandeep.manne@gmail.com $
 */

class ResourceActionDAO extends Core_DAO
{
	private $_name    = 'resource_action';
	private $_primary = 'action_id';
	
	public function addAction($controllerId, $actionName)
	{
		return $this->insert(array("controller_id" => $controllerId, "action_name" => $actionName));
	}
	
	
	public function getActionsByControllerId($controllerId)
	{
		return $this->select()
			 		->from($this->_name)
			 		->where("controller_id = ?", $controllerId)
			 		->query()
			 		->fetchAll();
	}
}